import Vue from 'vue'
import VueRouter from 'vue-router'

// 引入5个组件
import HomeView from '@/views/HomeView/HomeView'
import CategoryView from '@/views/CategoryView/CategoryView'
import FindView from '@/views/FindView/FindView'
import CartView from '@/views/CartView/CartView'
import MineView from '@/views/MineView/MineView'

Vue.use(VueRouter)

const routes = [{
        path: '/',
        redirect: '/homeview'
    },
    {
        path: '/homeview',
        component: HomeView
    },
    {
        path: '/categoryview',
        component: CategoryView
    },
    {
        path: '/findview',
        component: FindView
    },
    {
        path: '/cartview',
        component: CartView
    },
    {
        path: '/mineview',
        component: MineView
    },

]

const router = new VueRouter({
    routes
})

export default router